package com.yt.lxh.common.exception;

import com.yt.lxh.common.result.ResultCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * 业务异常的基类
 */
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class ServiceException extends RuntimeException{

    private ResultCodeEnum errCode;
    public ServiceException(ResultCodeEnum errCode, String message) {
        super(message);
        this.errCode = errCode;
    }


//
//    public ServiceException(String message) {
//        super(message);
//    }
//
//    public ServiceException(String message, Throwable cause) {
//        super(message, cause);
//    }
//
//    public ServiceException(Throwable cause) {
//        super(cause);
//    }
//
//    public ServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
//        super(message, cause, enableSuppression, writableStackTrace);
//    }
}
